import pytest
from requestMethod.mallHomeApi import mrjbusC
from requestMethod.pre_Verify.p_mallHomeCase import pre_mallHome
from requestMethod.struc_Verify.s_mallHomeCase import strut_mallHome


def test_newGoodsSpuDetail_State():
    """
    验证商品详情状态
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/newGoodsSpuDetail
    """
    pre_mallHome().SpuDetailState()


def test_newGoodsSpuDetail_Time():
    """
    验证商品详情响应时长
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/newGoodsSpuDetail
    """
    pre_mallHome().SpuDetailTime()

def test_newGoodsSpuDetail_Data():
    """
    验证商品详情响应数据
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/newGoodsSpuDetail
    """
    pre_mallHome().SpuDetailData()

def test_newGoodsSpuDetail_Struct():
    """
    验证商品详情数据结构
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/newGoodsSpuDetail
    """
    strut_mallHome().SpuDetailSruct()

def test_mallHome_State():
    """
    验证首页接口状态
    :author 露驿星程
    :uri : /front/p/mallHome/main
    """
    pre_mallHome().homePageState()

def test_homePage_Time():
    """
    验证首页接口响应时长
    :author 露驿星程
    :uri : /front/p/mallHome/main
    """
    pre_mallHome().homePageTime()

def test_homePage_Data():
    """
    验证首页接口响应数据
    :author 露驿星程
    :uri : /front/p/mallHome/main
    """
    pre_mallHome().homePageData()

def test_homePage_Struct():
    """
    验证首页接口数据结构
    :author 露驿星程
    :uri : /front/p/mallHome/main
    """
    strut_mallHome().homePageSruct()

def test_topProducts_State():
    """
    验证商城首页平台推荐接口状态
    :author 露驿星程
    :uri : /front/p/mallHome/topProducts
    """
    pre_mallHome().topProductsState()

def test_topProducts_Time():
    """
    验证商城首页平台推荐接口响应时长
    :author 露驿星程
    :uri : /front/p/mallHome/topProducts
    """
    pre_mallHome().topProductsTime()

def test_topProducts_Data():
    """
    验证商城首页平台推荐接口响应数据
    :author 露驿星程
    :uri : /front/p/mallHome/topProducts
    """
    pre_mallHome().topProductsData()

def test_topProducts_Struct():
    """
    验证本周上新接口状态
    :author 露驿星程
    :uri :  /front/p/mallHome/weeklyProducts
    """
    strut_mallHome().topProductsStruct()

def test_weeklyProducts_Time():
    """
    验证本周上新接口响应时长
    :author 露驿星程
    :uri : /front/p/mallHome/weeklyProducts
    """
    pre_mallHome().weeklyProductsTime()

def test_weeklyProducts_Data():
    """
    验证本周上新接口响应数据
    :author 露驿星程
    :uri : /front/p/mallHome/weeklyProducts
    """
    pre_mallHome().weeklyProductsData()

def test_weeklyProducts_Struct():
    """
    验证本周上新接口数据结构
    :author 露驿星程
    :uri : /front/p/mallHome/weeklyProducts
    """
    strut_mallHome().weeklyProductsStruct()

def test_popularProducts_State():
    """
    验证口碑爆款接口状态
    :author 露驿星程
    :uri :  /front/p/mallHome/popularProducts
    """
    pre_mallHome().popularProductsState()

def test_popularProducts_Time():
    """
    验证口碑爆款接口响应时长
    :author 露驿星程
    :uri : /front/p/mallHome/popularProducts
    """
    pre_mallHome().popularProductsTime()

def test_popularProducts_Data():
    """
    验证口碑爆款接口响应数据
    :author 露驿星程
    :uri : /front/p/mallHome/popularProducts
    """
    pre_mallHome().popularProductsData()

def test_subsidyProducts_State():
    """
    验证会员福利社接口状态
    :author 露驿星程
    :uri : /front/p/mallHome/subsidyProducts
    """
    pre_mallHome().subsidyProductsState()

def test_subsidyProducts_Time():
    """
    验证会员福利社接口响应时长
    :author 露驿星程
    :uri : /front/p/mallHome/subsidyProducts
    """
    pre_mallHome().subsidyProductsTime()

def test_subsidyProducts_Data():
    """
    验证会员福利社接口响应数据
    :author 露驿星程
    :uri : /front/p/mallHome/subsidyProducts
    """
    pre_mallHome().subsidyProductsData()

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandDetail_State(brandId):
    """
    验证品牌页-本月推荐接口状态
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandDetail
    """
    pre_mallHome().getHomeBrandDetailState(brandId=brandId)

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandDetail_Time(brandId):
    """
    验证品牌页-本月推荐接口响应时长
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandDetail
    """
    pre_mallHome().getHomeBrandDetailTime(brandId=brandId)

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandDetail_Data(brandId):
    """
    验证品牌页-本月推荐接口响应数据
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandDetail
    """
    pre_mallHome().getHomeBrandDetailData(brandId=brandId)

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandGoods_State(brandId):
    """
    验证品牌页-本月系列接口状态
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandGoods
    """
    pre_mallHome().getHomeBrandGoodsState(brandId=brandId)

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandGoods_Time(brandId):
    """
    验证品牌页-本月系列接口响应时长
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandGoods
    """
    pre_mallHome().getHomeBrandGoodsTime(brandId=brandId)

@pytest. mark. parametrize("brandId",mrjbusC.getBrandId())
def test_getHomeBrandGoods_Data(brandId):
    """
    验证品牌页-本月系列接口响应数据
    :author 露驿星程
    :uri : /front/p/homeBrand/getHomeBrandGoods
    """
    pre_mallHome().getHomeBrandGoodsData(brandId=brandId)

@pytest. mark. parametrize("intendedId",[1,2,3,4,5])
def test_intendedCustomer_State(intendedId):
    """
    验证品意向客户接口状态
    :author 露驿星程
    :uri : /front/p/custom/intendedCustomer
    """
    pre_mallHome().intendedCustomerState(intendedId=intendedId)

@pytest. mark. parametrize("intendedId",[1,2,3,4,5])
def test_intendedCustomer_Time(intendedId):
    """
    验证品意向客户接口响应时长
    :author 露驿星程
    :uri : /front/p/custom/intendedCustomer
    """
    pre_mallHome().intendedCustomerTime(intendedId=intendedId)

@pytest. mark. parametrize("intendedId",[1,2,3,4,5])
def test_intendedCustomer_Data(intendedId):
    """
    验证品意向客户接口响应数据
    :author 露驿星程
    :uri : /front/p/custom/intendedCustomer
    """
    pre_mallHome().intendedCustomerData(intendedId=intendedId)

@pytest. mark. parametrize("spuId",mrjbusC.getSpuId())
def test_sourceBySpuId_State(spuId):
    """
    验证商品素材接口状态
    :author 露驿星程
    :uri : /front/p/sourceBySpuId
    """
    pre_mallHome().sourceBySpuIdState(spuId=spuId)

@pytest. mark. parametrize("spuId",mrjbusC.getSpuId())
def test_sourceBySpuId_Time(spuId):
    """
    验证商品素材接口响应时长
    :author 露驿星程
    :uri : /front/p/sourceBySpuId
    """
    pre_mallHome().sourceBySpuIdTime(spuId=spuId)

@pytest. mark. parametrize("spuId",mrjbusC.getSpuId())
def test_sourceBySpuId_Data(spuId):
    """
    验证商品素材接口响应数据
    :author 露驿星程
    :uri : /front/p/sourceBySpuId
    """
    pre_mallHome().sourceBySpuIdData(spuId=spuId)

@pytest. mark. parametrize("spuKW",mrjbusC.getSelectSpuKW())
def test_selectGood_State(spuKW):
    """
    验证首页搜索商品接口状态
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/selectGoodsSpuList
    """
    pre_mallHome().selectGoodState(spuKW=spuKW)

@pytest. mark. parametrize("spuKW",mrjbusC.getSelectSpuKW())
def test_selectGood_Time(spuKW):
    """
    验证首页搜索商品接口响应时长
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/selectGoodsSpuList
    """
    pre_mallHome().selectGoodTime(spuKW=spuKW)

@pytest. mark. parametrize("spuKW",mrjbusC.getSelectSpuKW())
def test_selectGood_Data(spuKW):
    """
    验证首页搜索商品接口响应数据
    :author 露驿星程
    :uri : /front/p/newGoodsSpu/selectGoodsSpuList
    """
    pre_mallHome().selectGoodData(spuKW=spuKW)

def test_personalInfo_State():
    """
    验证个人信息接口状态
    :author 露驿星程
    :uri : /liveUser/getPersonalInfoByUserId
    """
    pre_mallHome().personalInfoState()

def test_personalInfo_Time():
    """
    验证个人信息接口响应时长
    :author 露驿星程
    :uri : /liveUser/getPersonalInfoByUserId
    """
    pre_mallHome().personalInfoTime()

def test_personalInfo_Data():
    """
    验证个人信息接口响应时长
    :author 露驿星程
    :uri : /liveUser/getPersonalInfoByUserId
    """
    pre_mallHome().personalInfoData()

def test_hotLiveRoom_State():
    """
    验证直播热门列表接口状态
    :author 露驿星程
    :uri : /homePage/hotLiveRoom
    """
    pre_mallHome().hotLiveRoomState()

def test_hotLiveRoom_Time():
    """
    验证直播热门列表接口响应时长
    :author 露驿星程
    :uri : /homePage/hotLiveRoom
    """
    pre_mallHome().hotLiveRoomTime()

def test_hotLiveRoom_Data():
    """
    验证直播热门列表接口响应数据
    :author 露驿星程
    :uri : /homePage/hotLiveRoom
    """
    pre_mallHome().hotLiveRoomData()

def test_hpBanner_State():
    """
    验证看直播页面banner接口状态
    :author 露驿星程
    :uri : /homePage/homePageBanner
    """
    pre_mallHome().hpBannerState()

def test_hpBanner_Time():
    """
    验证看直播页面banner接口响应时长
    :author 露驿星程
    :uri : /homePage/homePageBanner
    """
    pre_mallHome().hpBannerTime()

def test_hpBanner_Data():
    """
    验证看直播页面banner接口响应数据
    :author 露驿星程
    :uri : /homePage/homePageBanner
    """
    pre_mallHome().hpBannerData()

def test_focusLive_State():
    """
    验证直播关注列表接口状态
    :author 露驿星程
    :uri : /homePage/focusLiveRoom
    """
    pre_mallHome().focusLiveState()

def test_focusLive_Time():
    """
    验证直播关注列表接口响应时长
    :author 露驿星程
    :uri : /homePage/focusLiveRoom
    """
    pre_mallHome().focusLiveTime()

def test_focusLive_Data():
    """
    验证直播关注列表接口响应时长
    :author 露驿星程
    :uri : /homePage/focusLiveRoom
    """
    pre_mallHome().focusLiveData()

def test_hpSearch_State():
    """
    验证直播页面搜索接口状态
    :author 露驿星程
    :uri : /homePage/homePageSearch
    """
    pre_mallHome().hpSearchState()

def test_hpSearch_Time():
    """
    验证直播页面搜索接口响应时长
    :author 露驿星程
    :uri : /homePage/homePageSearch
    """
    pre_mallHome().hpSearchTime()

def test_hpSearch_Data():
    """
    验证直播页面搜索接口响应数据
    :author 露驿星程
    :uri : /homePage/homePageSearch
    """
    pre_mallHome().hpSearchData()

def test_liveOpenInfo_State():
    """
    验证开播信息接口状态
    :author 露驿星程
    :uri : /liveRoom/getOnLiveOpenInfoVo
    """
    pre_mallHome().liveOpenInfoState()

def test_liveOpenInfo_Time():
    """
    验证开播信息接口响应时长
    :author 露驿星程
    :uri : /liveRoom/getOnLiveOpenInfoVo
    """
    pre_mallHome().liveOpenInfoTime()

def test_liveOpenInfo_Data():
    """
    验证开播信息接口响应数据
    :author 露驿星程
    :uri : /liveRoom/getOnLiveOpenInfoVo
    """
    pre_mallHome().liveOpenInfoData()
